package com.vip.websocket.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * WebSocket配置，开启WebSocket支持
 *
 * @author wgb
 * @date 2024/06/06
 */
@Configuration
public class WebSocketConfig {
    /**
     * 向Spring注册ServerEndpointExporter
     *
     * @return {@link ServerEndpointExporter}
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }
}
